#ifndef SSLSERVERTHREAD_H
#define SSLSERVERTHREAD_H


#include <QThread>
#include <QTcpSocket>
#include <QDebug>
#include <QSslSocket>
#include <QSslKey>

class SSLThread : public QThread
{
    Q_OBJECT

public:
    SSLThread(int socketDescriptor, const QString &message, QObject *parent);

    void run();

signals:
    void error(QTcpSocket::SocketError socketError);
    void clientMessage(QString);

    //new
public slots:
    void readyRead(); //for reading data from the client
    void disconnect();
    void sendData(QString msg); // for sending data to the client

private:
    int socketDescriptor;
    QSslSocket *serverSocket;
    QString text;
    quint16 blockS;
};

#endif // SSLSERVERTHREAD_H
